<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8"/>
		<title>条件语句</title>
	</head>
	<body>
		<script type="text/javascript">
		/* var weight = prompt("请输入您的体重？（单位:KG）");
		var height = prompt("请输入您的身高？（单位:m）");
		BMI=weight/(height^2);
		if(BMI<18.5){
			alert("体重过轻！");
		}else if(BMI<25){
			alert("体重正常！");
		}else if(BMI<28){
			alert("过重！");
		}else if(BMI<=32){
			alert("肥胖！");
		}else{
			alert("非常肥胖！");
		} */

		var time = new Date();
		var week = time.getDay();
		switch(week){
			case 1:
				alert("今天星期一！");
				break;
			case 2:
				alert("今天星期二！");
				break;
			case 3:
				alert("今天星期三！");
				break;
			case 4:
				alert("今天星期四！");
				break;
			case 5:
				alert("今天星期五！");
				break;
			case 6:
				alert("今天星期六！");
				break;
			case 7:
				alert("今天星期七！");
				break;
			default:
				alert("系统错误！");
		}


		</script>
	</body>
</html>